package org.rpc.cilent;

import org.rpc.proxy.ProxyFactory;


/**
 * 可以生成接口的代理
 */
public class RpcReference {
    public ProxyFactory proxyFactory;
    public RpcReference(ProxyFactory proxyFactory) {
        this.proxyFactory = proxyFactory;
    }
    // 传一个对象，返回一个对象代理
    public <T> T get(Class<T> tClass) throws Throwable {
        return proxyFactory.getProxy(tClass);
    }
}
